package top.revery.api.api.chat;

import com.alibaba.fastjson.JSONObject;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import top.revery.api.config.UserPageData;
import top.revery.api.entity.chat.BaseLogChat;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author denghao
 * @title
 * @package
 * @date 2020/1/17 19:55
 */

@RequestMapping("/api_chat")

public interface IChatApi  {
    //单个账户导入
    @RequestMapping("/amount")
    public JSONObject amount(@RequestParam("identifier") String identifier);

    //系统向用户向用户发送消息
    @RequestMapping("/smsMessageSys")
    public JSONObject smsMessageSys(@RequestParam("fromUser") String fromUser, @RequestParam("toUser")String toUser,
                                    @RequestParam("msgBody") String msgBody);
    //管理员向指定的账号批量发消息
    @RequestMapping("/smsMessageAll")

    public JSONObject smsMessageAll(@RequestParam("message") String message);

    //回调单消息之后
    @RequestMapping("/notify")
    public JSONObject notify(HttpServletRequest request) throws IOException;

    //查询登录用户
    @RequestMapping("/getUserList")
    public List<BaseLogChat> getUserList(@RequestParam("toAccount") String toAccount);

    //查询用户对话
    @RequestMapping("/getList")
    public UserPageData getList(int pageNum, int pageSize, @RequestBody Map map);

}
